package com.example.springbootdatamock.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.math.BigDecimal;

@Mapper
@DS("ck")
public interface CKMapper {
  @Update({"create table if not exists di(    createTime DateTime,    brand String,    saleAmount Decimal64(2),   dt String )engine = SummingMergeTree(saleAmount)partition by (dt) order by (brand);"})
  void createTable();
  
  @Insert({"insert into di values(#{dateTime},#{brand},#{sm} ,#{dt})"})
  void insertData(@Param("dateTime") String paramString1, @Param("brand") String paramString2, @Param("sm") BigDecimal paramBigDecimal, @Param("dt") String paramString3);
}


